﻿<!DOCTYPE html>
<html>
     <head>
          <meta charset="UTF-8">
          <title></title>
     </head>
     <body>
        <textarea rows="10" cols="60" id="code">
        </textarea>
        <br>
        <button id="exec">执行</button>
     </body>
</html>
<script type="text/javascript">
    var btn = window.document.getElementById("exec");
    btn.onclick = function(){
        var code = document.getElementById("code").value;
        eval(code);
		
    }
</script>
